package folexpr.compiler.visitors;

import folexpr.compiler.CompilerConstants;
import folexpr.compiler.visitors.a1_close.ClosedFormVisitor;
import folexpr.compiler.visitors.b_implication.ImplicReductionVisitor;
import folexpr.compiler.visitors.c_negation.NegReductionVisitor;
import folexpr.compiler.visitors.d_renaming.RenamingVisitor;
import folexpr.compiler.visitors.e_movequantahead.QuantificationsAHeadVisitor;
import folexpr.compiler.visitors.f_prenexcong.CongPrenexFormVisitor;
import folexpr.compiler.visitors.g_skolem.SkolemVisitor;
import folexpr.compiler.visitors.h_removeforall.RemoveForallVisitor;
import folexpr.compiler.visitors.i_removebracket.RemoveUnneededBracketVisitor;

public class ComplierVisitorFactory
{
	public CompilerVisitor getVisitorInstance(String op)
	{
		CompilerVisitor visitor = null;
		
		if (op.equals(CompilerConstants.CLOSE)) 
			visitor = new ClosedFormVisitor();
		
		if (op.equals(CompilerConstants.IMPL_RED)) 
			visitor = new ImplicReductionVisitor();
		
		if (op.equals(CompilerConstants.NEG_RED)) 
			visitor = new NegReductionVisitor();
		
		if (op.equals(CompilerConstants.VAR_REN)) 
			visitor = new RenamingVisitor();
		
		if (op.equals(CompilerConstants.QUANT_AHEAD))
			visitor = new QuantificationsAHeadVisitor();
		
		if (op.equals(CompilerConstants.PRENEX_CONG))
			visitor = new CongPrenexFormVisitor();
		
		if (op.equals(CompilerConstants.SKOLEM)) 
			visitor = new SkolemVisitor();
		
		if (op.equals(CompilerConstants.REMOVE_FORALL))
			visitor = new RemoveForallVisitor();
		
		if (op.equals(CompilerConstants.REMOVE_BRACKET)) 
			visitor = new RemoveUnneededBracketVisitor();
	
		return visitor;
	}

}
